package com.yutao;

import com.yutao.service.thriftService.RPCThriftServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class JavaMatchServerApplication {

    public static RPCThriftServer rpcThriftServer;
    public static void main(String[] args) {

        ConfigurableApplicationContext context = SpringApplication.run(JavaMatchServerApplication.class, args);
        try {
            rpcThriftServer = context.getBean(RPCThriftServer.class);
            rpcThriftServer.start();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
